﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Whir_System_Module_Survey_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../Skin/Default/Css/main.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
        if (top.location == self.location) { 
            alert('禁止访问子栏目页！将跳转到默认页面');
            top.location='../../Default.aspx';
        } 
    </script>

</head>
<body>
    <form id="form1" runat="server">
        <whir:ezGridView ID="GridView1" runat="server" Width="100%" BackColor="#CBCBCB" AutoGenerateColumns="false"
            DataKeyNames="SurveyID">
            <HeaderStyle CssClass="grid_Title" Height="20px" />
            <RowStyle CssClass="grid_td" Height="23px" />
            <CustomColumns>
                <NumberColumn Align="Left" Position="0" Priority="0" Visible="False" Width="0" />
                <MultiChooseColumn Align="Left" Position="0" Priority="0" Visible="True" Width="0" />
                <RadioButtonColumn Align="Left" Position="0" Priority="0" Visible="False" Width="0" />
            </CustomColumns>
            <Columns>
                <asp:BoundField DataField="SurveyTitle" HeaderText="标题" />
                <asp:TemplateField HeaderText="题目类别">
                    <itemtemplate>
                        <%# (int.Parse(Eval("SurveyType").ToString()) == 1?"单选题":"多选题")%>
                    </itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="状态">
                    <itemtemplate>
                        <%# (bool.Parse(Eval("IsShow").ToString())?"显示":"隐藏")%>
                    </itemtemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="CreateDate" HeaderText="注册时间" />
                <asp:TemplateField HeaderText="编辑">
                    <itemtemplate>
                        <a href='SurveyAdd.aspx?SurveyID=<%# Eval("SurveyID") %>&Action=Modify'>编辑</a>
                    </itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="选项">
                    <itemtemplate>
                        <a href='SurveyItemList.aspx?SurveyID=<%# Eval("SurveyID") %>'>查看选项</a>
                    </itemtemplate>
                </asp:TemplateField>
            </Columns>
        </whir:ezGridView>
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="f-gray" CustomInfoHTML="目前在第<font color=red>%currentPageIndex%</font>页,共有<font color=red>%PageCount%</font>页,共有<font color=red>%RecordCount%</font>条记录&nbsp;&nbsp;&nbsp;&nbsp;"
            FirstPageText="第一页" LastPageText="最后一页" NextPageText="下一页" OnPageChanged="AspNetPager1_PageChanged"
            PageSize="10" PrevPageText="上一页" ShowCustomInfoSection="Left" ShowInputBox="Always"
            ShowPageIndex="False" Width="98%">
        </webdiyer:AspNetPager>
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DADADA"
            id="divMessage" runat="server" visible="false">
            <tr>
                <td class="form_td"><strong>无法找到匹配的数据</strong> </td>
            </tr>
        </table>
        <div class="command">
            <asp:Button ID="Button1" runat="server" Text="添加" CssClass="btn_default" OnClick="Button1_Click" />
            &nbsp;<asp:Button ID="btnDelete" runat="server" Text="删除" CssClass="btn_default"
                OnClick="btnDelete_Click" OnClientClick="return confirm('确定删除选中的数据？');" /></div>
    </form>
</body>
</html>
